<extend name="Public:template" />
<block name="page_header">
<!--选择区域页面  -->
<ul class="header-sub">
  <li class="previous"><a href="{:U('Index/index')}" class="btn btn-default active" role="button"><span class="icon icon-home"></span>首页</a></li>
  <li ><h3>选择离您最近的小区</h3></li>
  <li class="next "><a href="{:U('Cust/index')}" class="btn btn-warning" role="button">我的<span class="icon-white icon-user"></span></a></li>
</ul>
</block>
<block name="page_body">
	<!-- 区域列表 -->
	<div class="list-group mt15">
		<volist name="shopList" id="val">
		<a href="#" class="list-group-item" style="border-left:5px solid #ccc" onclick="chgShop('{:U('Index/doChgshop',array('shop_id'=>$val['id']))}')">
			<h4 class="list-group-item-heading" style="line-height:30px;">{$i}.{$val.address}</h4><span class="icon icon-chevron-right pull-right"></span>
			<p class="list-group-item-text">
				<ul>
					<li>【联系方式】：{$val.link_way}</li>
					<li>【配送区域】：{$val.district}，{$val.deliver_around}</li>
				</ul>
			</p>
			
  		</a>
  		</volist>
	</div>

	<div class="clearfix">&nbsp;</div>
</block>
<block name="script_footer">
<script type="text/javascript">
function chgShop(action_url){
	$.ajax({
        'url': action_url,
        'type':"get",
        'dataType': "json",
        'success': function (data) {
        	var error = data['error'];
        	var message = data['message'];
        	if(error=='0'){
        		document.location.href="/Index/index.html"; 
        	}else{
        		alert(message);
        	}
        }
    });
	return false;
}
</script>
</block>